package milkyway.hightech.comparators;

import milkyway.hightech.entry.Entry;

import java.util.Comparator;
import java.util.Date;

/**
 *
 * @author michael
 */
public class SortByDate implements Comparator<Entry>
{
    /**
     *
     * @param e1
     * @param e2
     * @return
     */
    @Override
    public int compare(Entry e1, Entry e2)
    {
        Date d1 = e1.getDate();
        Date d2 = e2.getDate();

        return d1.compareTo(d2);
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
